package com.jintian.smart.kernel.core.jackson;

import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.type.*;
import com.fasterxml.jackson.databind.util.LookupCache;
import com.jintian.smart.kernel.core.domain.ITailEntity;

public class TypeFactoryExt extends TypeFactory {
    private static final long serialVersionUID = 1L;

    public TypeFactoryExt(LookupCache<Object, JavaType> typeCache) {
        super(typeCache);
    }

    public TypeFactoryExt(LookupCache<Object, JavaType> typeCache, TypeParser p, TypeModifier[] mods,
                          ClassLoader classLoader) {
        super(typeCache, p, mods, classLoader);
    }

    @Override
    protected JavaType _fromWellKnownInterface(ClassStack context, Class<?> rawType, TypeBindings bindings,
                                               JavaType superClass, JavaType[] superInterfaces) {
        if (ITailEntity.class == rawType) {
            return null;
        }
        return super._fromWellKnownInterface(context, rawType, bindings, superClass, superInterfaces);
    }
}
